/**
 * Created by JetBrains WebStorm.
 * User: Silence
 * Date: 3/11/12
 * Time: 11:01 AM
 * To change this template use File | Settings | File Templates.
 */

Ext.require('EM.model.budget.BudgetTree');

Ext.define('EM.store.BudgetTreeStore', {
    extend: 'Ext.data.TreeStore',
    model: 'EM.model.budget.BudgetTree',
    storeId: 'BudgetTreeStore',
    autoLoad: true,
    autoSync: true,
    proxy: {
        type: 'ajax',
        api:{
            read: 'data/event/server_budget.php?item=read_items',
            update: 'data/event/server_budget.php?item=update_items',
            destroy: 'data/event/server_budget.php?item=delete_items'
        },
        reader: {
            type:'json',
            successProperty:'success'
        },
        writer: {
            type:'json',
            successProperty:'success'
        }
    },
    folderSort: true
});